//
//  HMConst.swift
//  sinaweibo
//
//  Created by WGP on 16/4/9.
//  Copyright © 2016年 WGP. All rights reserved.
//

//swift只要不是在类里面的代码,全局都可以使用
//...可变参数
//默认参数 file: String = __FILE__,如果不传入参数就会使用 = 后面的代码

import UIKit

func HMPrint(items: Any, file: String = __FILE__, line: Int = __LINE__, function: String = __FUNCTION__)
{
    #if DEBUG
    
        print((file as NSString).lastPathComponent + "\n,[\(line)]行,方法名称:" + function + "\n输出:\(items)")
        
    #endif
}

//MARK: - 授权相关
//请求授权登陆界面的URL
let OauthUrl = "https://api.weibo.com/oauth2/authorize"

//创建App时用到的AppKey
let client_id: String  = "2076243931"

//授权回调url
let redirect_uri: String = "http://www.baidu.com/"

//TabBar的按钮的个数
let HMMainTabBarButtonCount = 5

//获得access_token的URL,因为API文档HTTP请求方式只能是POST,浏览器不能模拟
let access_tokenURL = "https://api.weibo.com/oauth2/access_token"


//access_token请求参数,client_id,client_secret,grant_type,grant_type为authorization_code时,code,redirect_uri

let client_secret = "18f115d593ff79fb6b0999daaa0e8913"
let grant_type = "authorization_code"


//账户归档和解档路径
let accountPath = NSSearchPathForDirectoriesInDomains(.DocumentDirectory, .UserDomainMask, true).last!.stringByAppendingString("/account.plist")


///欢迎label字体的大小
let HMWelcomeLabelFontSize: CGFloat  = 14

///默认动画的时长
let HMDefaultAnimationDuration: NSTimeInterval = 0.25

///新特性界面的数量
let HMNewFeatureItemCount = 4

//新特性界面开始体验的字体的大笑
let HMNewFeatureBtnFontSize: CGFloat = 18


//获得application的delegate
var getApplicationDelegate: AppDelegate
{
   get
   {
        return  UIApplication.sharedApplication().delegate as! AppDelegate
    }
}


//MARK: - 微博模型cell相关
//用户头像的大小
let HMIconViewWidth: CGFloat = 17.5

//昵称字体的大小
let HMNameLabelFontSize: CGFloat = 14

//发微博时间label字体的大小
let HMTimeLabelFontSize: CGFloat  = 11

//微博内容label
let HMTextLabelFontSize: CGFloat = 15

//cell的margin
let HMStatusCellMargin: CGFloat = 8


//刷新微博提示条数的label的高度
let TipLabelHeight: CGFloat = 44

//https://api.weibo.com/2/users/show.json?access_token=2.00oqxoiD2thVQC9cb192df96JlGkXD

//https://api.weibo.com/2/statuses/home_timeline.json?access_token=2.00oqxoiD2thVQC9cb192df96JlGkXD

//https://api.weibo.com/2/statuses/user_timeline.json?access_token=2.00oqxoiD2thVQC9cb192df96JlGkXD




